import request from '../utils/request'

// 发送验证码
export const getCode = (data) => {
  return request.post('/get/code', data)
}

// 发送验证码 /user/authentication
export const userAuthentication = (data) => {
  return request.post('/user/authentication', data)
}

// 登录 /login
export const login = (data) => {
  return request.post('/login', data)
}

// 权限管理 /auth/admin
export const authAdmin = (params) => {
  return request.get('/auth/admin', { params })
}

// 权限管理 /user/getmenu
export const userGetmenu = (params) => {
  return request.get('/user/getmenu', { params })
}

// 权限管理 /user/setmenu
export const userSetmenu = (data) => {
  return request.post('/user/setmenu', data)
}

// 权限管理 /menu/list
export const menuList = (params) => {
  return request.get('/menu/list', { params })
}

// 权限管理 /menu/selectlist
export const menuSelectlist = () => {
  return request.get('/menu/selectlist')
}

// 权限管理 /update/user
export const updateUser = (data) => {
  return request.post('/update/user', data)
}

// 用户菜单权限 /menu/permissions
export const menuPermissions = () => {
  return request.get('/menu/permissions')
}

// 陪护师头像 /photo/list
export const photoList = () => {
  return request.get('/photo/list')
}

// 陪护师添加 /companion
export const companion = (data) => {
  return request.post('/companion', data)
}

// 查询陪护师列表 /companion/list
export const companionList = (params) => {
  return request.get('/companion/list', { params })
}

// 陪护师删除 /delete/companion
export const deleteCompanion = (data) => {
  return request.post('/delete/companion', data)
}

// 陪护师删除 /admin/order
export const adminOrder = (params) => {
  return request.get('/admin/order', { params })
}

// 陪护师删除 /update/order
export const updateOrder = (data) => {
  return request.post('/update/order', data)
}
